package org.managarm.jmanaintlib.runtime.system;

import java.util.TreeMap;

import org.managarm.jmanaintlib.machine.VmMachine;

public class RtProcess {
	private final TreeMap<String, String> configuration
			= new TreeMap<String, String>();
	private final VmMachine virtualMachine;
	
	public RtProcess(VmMachine machine) {
		virtualMachine = machine;
	}
	
	public VmMachine getMachine() {
		return virtualMachine;
	}
	
	public String getConfig(String variable) {
		if(configuration.containsKey(variable) == false)
			return null;
		return configuration.get(variable);
	}
	
	public void setConfig(String variable, String string) {
		if(string == null)
			configuration.remove(variable);
		else
			configuration.put(variable, string);
	}
}
